package com.lv.service.impl;

import com.lv.mapper.TbItemMapper;
import com.lv.pojo.TbItem;
import com.lv.pojo.TbItemExample;
import com.lv.service.ItemService;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
@DubboService
public class ItemServiceImpl implements ItemService {
    @Resource
    private TbItemMapper im;

    @Override
    public List<TbItem> selectItemListByGoodsId(Long goodsId) {
        TbItemExample example = new TbItemExample();
        TbItemExample.Criteria criteria = example.createCriteria();
        criteria.andGoodsIdEqualTo(goodsId);
        return im.selectByExample(example);
    }
}
